package com.ruoyi.web.controller.system;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TestController TODO 测试返回值控制器
 *
 * @author augustqin
 * @Date 2024/11/7 13:25
 */
@RestController
@RequestMapping("/system/test")
public class TestApiController {

    @GetMapping("/api")
    public String test() {
        return "{\n" +
                "    \"status\": 200,\n" +
                "    \"msg\": \"success\",\n" +
                "    \"data\": {\n" +
                "        \"rules\": [\n" +
                "            {\n" +
                "                \"type\": \"select\",\n" +
                "                \"field\": \"pid\",\n" +
                "                \"value\": 0,\n" +
                "                \"title\": \"上级分类\",\n" +
                "                \"props\": {\n" +
                "                    \"multiple\": false,\n" +
                "                    \"placeholder\": \"请选择上级分类\",\n" +
                "                    \"filterable\": true\n" +
                "                },\n" +
                "                \"options\": [\n" +
                "                    {\n" +
                "                        \"value\": 0,\n" +
                "                        \"label\": \"顶级菜单\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 7,\n" +
                "                        \"label\": \"生活家居\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 53,\n" +
                "                        \"label\": \"运动专区\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 8,\n" +
                "                        \"label\": \"电子产品\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 1,\n" +
                "                        \"label\": \"家用电器\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 3,\n" +
                "                        \"label\": \"家具软装\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 6,\n" +
                "                        \"label\": \"美妆个护\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 4,\n" +
                "                        \"label\": \"居家餐厨\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 2,\n" +
                "                        \"label\": \"电视影音\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 9,\n" +
                "                        \"label\": \"日用文创\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 107,\n" +
                "                        \"label\": \"饰品\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 104,\n" +
                "                        \"label\": \"宠物用品\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 101,\n" +
                "                        \"label\": \"母婴\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"value\": 98,\n" +
                "                        \"label\": \"服饰\"\n" +
                "                    }\n" +
                "                ]\n" +
                "            },\n" +
                "            {\n" +
                "                \"type\": \"input\",\n" +
                "                \"field\": \"cate_name\",\n" +
                "                \"value\": \"\",\n" +
                "                \"title\": \"分类名称\",\n" +
                "                \"props\": {\n" +
                "                    \"type\": \"text\",\n" +
                "                    \"placeholder\": \"请输入分类名称\",\n" +
                "                    \"maxlength\": 8\n" +
                "                },\n" +
                "                \"validate\": [\n" +
                "                    {\n" +
                "                        \"message\": \"请输入分类名称\",\n" +
                "                        \"required\": true,\n" +
                "                        \"type\": \"string\",\n" +
                "                        \"trigger\": \"change\"\n" +
                "                    }\n" +
                "                ]\n" +
                "            },\n" +
                "            {\n" +
                "                \"type\": \"frame\",\n" +
                "                \"field\": \"pic\",\n" +
                "                \"value\": \"\",\n" +
                "                \"title\": \"分类图标(180*180)\",\n" +
                "                \"props\": {\n" +
                "                    \"type\": \"image\",\n" +
                "                    \"maxLength\": 1,\n" +
                "                    \"title\": \"请选择分类图标(180*180)\",\n" +
                "                    \"src\": \"\\/admin\\/widget.images\\/index.html?fodder=pic\",\n" +
                "                    \"icon\": \"el-icon-picture-outline\",\n" +
                "                    \"width\": \"950px\",\n" +
                "                    \"height\": \"560px\",\n" +
                "                    \"footer\": false\n" +
                "                }\n" +
                "            },\n" +
                "            {\n" +
                "                \"type\": \"frame\",\n" +
                "                \"field\": \"big_pic\",\n" +
                "                \"value\": \"\",\n" +
                "                \"title\": \"分类大图(468*340)\",\n" +
                "                \"props\": {\n" +
                "                    \"type\": \"image\",\n" +
                "                    \"maxLength\": 1,\n" +
                "                    \"title\": \"请选择分类大图(468*340)\",\n" +
                "                    \"src\": \"\\/admin\\/widget.images\\/index.html?fodder=big_pic\",\n" +
                "                    \"icon\": \"el-icon-picture-outline\",\n" +
                "                    \"width\": \"950px\",\n" +
                "                    \"height\": \"560px\",\n" +
                "                    \"footer\": false\n" +
                "                }\n" +
                "            },\n" +
                "            {\n" +
                "                \"type\": \"inputNumber\",\n" +
                "                \"field\": \"sort\",\n" +
                "                \"value\": 0,\n" +
                "                \"title\": \"排序\",\n" +
                "                \"props\": {\n" +
                "                    \"placeholder\": \"请输入排序\",\n" +
                "                    \"min\": 0,\n" +
                "                    \"precision\": 0\n" +
                "                }\n" +
                "            },\n" +
                "            {\n" +
                "                \"type\": \"radio\",\n" +
                "                \"field\": \"is_show\",\n" +
                "                \"value\": 1,\n" +
                "                \"title\": \"状态\",\n" +
                "                \"props\": {},\n" +
                "                \"options\": [\n" +
                "                    {\n" +
                "                        \"label\": \"显示\",\n" +
                "                        \"value\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"label\": \"隐藏\",\n" +
                "                        \"value\": 0\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ],\n" +
                "        \"title\": \"添加分类\",\n" +
                "        \"method\": \"POST\",\n" +
                "        \"info\": \"\",\n" +
                "        \"status\": true\n" +
                "    }\n" +
                "}";
    }
}
